<template>
  <div style="padding: 10px;background: #f8f8f9">
    <Card title="系统设置" icon="ios-options" style="width: 500px;">
      <CellGroup>
        <Cell title="是否检查必须送审材料">
          <i-switch v-model="checkProjectFile" @on-change="changeFile" slot="extra"/>
        </Cell>
      </CellGroup>
    </Card>
  </div>
</template>

<script>
import { getSysParam, setSysParam } from '../../../api/sys/param'

export default {
  name: 'setting',
  data () {
    return {
      checkProjectFile: true
    }
  },
  methods: {
    changeFile () {
      let value = this.checkProjectFile ? 'Y' : 'N'
      setSysParam('check_project_file', value).then(res => {
      })
    },
    init () {
      getSysParam('check_project_file').then(res => {
        this.checkProjectFile = res.data === 'Y'
      })
    }
  },
  mounted () {
    this.init()
  }
}
</script>

<style scoped>

</style>
